package com.ybybh.gamecenter.service;


import com.ybybh.gamecenter.entity.News;
import com.ybybh.gamecenter.mapper.NewsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service

public class NewsService {
    @Autowired
    private NewsMapper newsMapper;

    //需要有一个能够实现得到首页想要展现的最新新闻列表的业务逻辑
    public List<News> findAll(){
        //从数据库中查询得到首页想要展现的最新新闻列表
        return newsMapper.selectAll();
    }


}
